/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bpmlab.shift.conversores;

import bpmlab.shift.entity.Nutriente;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;

/**
 *
 * @author victorperes
 */
@FacesConverter(value = "NutrienteConversor")
public class NutrienteConversor implements Converter {

    private final Converter converter = new GenericConverter<>(Nutriente.class);

    @Override
    public Object getAsObject(FacesContext fc, UIComponent uic, String string) {
        return converter.getAsObject(fc, uic, string);
    }

    @Override
    public String getAsString(FacesContext fc, UIComponent uic, Object o) {
        return converter.getAsString(fc, uic, o);
    }
    
}
